#include <iostream>

using std::cout;
using std::endl;

template<class T>
class Outer
{
    private:
        int m_outerInt;
    public:
        Outer() {m_outerInt = 0;}
        void DisplayOut(T tData);
    
    public:
        class Inner
        {
            public:
                T m_innerInt;
            public:
                Inner(T tData);
                void DisplayIn(T tData);
        };
};

template <class T>
void Outer<T>::DisplayOut(T tData)
{
    Inner clsInner(tData);
    cout << m_outerInt << endl;
    cout << clsInner.m_innerInt << endl;
}


template <class T>
void Outer<T>::Inner::DisplayIn(T tData)
{
    m_innerInt = tData;
    cout << m_innerInt << endl;
}


template <class T>
Outer<T>::Inner::Inner(T tData)
{
    m_innerInt = tData;
}


int main()
{
    Outer<int> out;
    Outer<int>::Inner in(11);
    out.DisplayOut(1000);
    in.DisplayIn(12);

    return 0;
}
